<?php
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});
//基础工具
Route::group( function (){
    Route::post('tools/uploadpic', 'v1.Tools/uploadpic');//上传
    Route::post('tools/uploadpicmore', 'v1.Tools/uploadpicmore');//多图上传
    Route::get('tools/uploadpicmore', 'v1.Tools/uploadpicmore');//多图上传
})->allowCrossDomain();
//基础数据
Route::group( function (){
    Route::get('basedata/userlist', 'v1.BaseData/userlist');//获取用户列表
})->allowCrossDomain();
//用户
Route::group( function (){
    Route::get('user/getUserInfo', 'v1.User/getUserInfo');//获取用户信息
    Route::post('user/bindUser', 'v1.User/bindUser');//绑定禅道用户
    Route::get('user/manageList', 'v1.User/manageList');//删除管理员用户
    Route::post('user/addManageUser', 'v1.User/addManageUser');//添加管理员用户
    Route::get('user/delManageUser', 'v1.User/delManageUser');//删除管理员用户
})->allowCrossDomain();
//项目
Route::group( function (){
    Route::get('project/projectlistpage', 'v1.Project/projectlistpage');//项目列表（带分页）
    Route::get('project/findProjectNo', 'v1.Project/findProjectNo');//检查项目编号的重复问题
    Route::post('project/add', 'v1.Project/add');//项目立项
    Route::get('project/detail', 'v1.Project/detail');//项目详情
    Route::get('project/del', 'v1.Project/del');//删除项目
    Route::post('project/set/status', 'v1.Project/projectsetstatus');//设置项目状态
    Route::post('project/edit', 'v1.Project/edit');//项目编辑
    Route::post('project/del', 'v1.Project/del');//删除项目
    Route::get('project/meeting/list', 'v1.Project/meetinglist');//会议事项列表
    Route::post('project/meeting/add', 'v1.Project/meetingadd');//会议事项添加
    Route::post('project/meeting/edit', 'v1.Project/meetingedit');//会议事项编辑
    Route::get('project/meeting/set/status', 'v1.Project/setmeetingstatus');//会议事项状态设置
    Route::get('project/meeting/del', 'v1.Project/meetingdel');//会议事项删除
})->allowCrossDomain();
//基础设置
Route::group( function () {
    Route::get('project/list', 'v1.Project/projectlist');//获取禅道项目列表
    Route::get('project/getStageCurrInfo', 'v1.Project/getStageCurrInfo');//根据类别id获取当前阶段信息
    Route::get('project/projectlist', 'v1.Project/projecMytlist');//获取项目列表
    Route::post('project/project/stage/chagestatus', 'v1.Project/setprojectstagestatus');//改变当前阶段的状态

    Route::get('project/class/list', 'v1.Project/classlist');//项目类别列表
    Route::post('project/class/save', 'v1.Project/saveclass');//项目类别新增/编辑
    Route::get('project/class/del', 'v1.Project/delclass');//项目类别删除

    Route::get('project/stage/list', 'v1.Project/stageclass');//项目阶段列表
    Route::post('project/stage/save', 'v1.Project/savestage');//项目阶段新增/编辑
    Route::get('project/stage/del', 'v1.Project/delstage');//项目阶段删除

    Route::get('project/classstage/displaylist', 'v1.Project/classstagedisplaylist');//项目配置总览
    Route::get('project/classstage/list', 'v1.Project/classstagelist');//选择类别配置列表
    Route::get('project/classstage/setstatus', 'v1.Project/setclassstage');//设置配置状态
    Route::post('project/classstage/save', 'v1.Project/saveclassstage');//项目类别配置新增/编辑
    Route::get('project/classstage/del', 'v1.Project/delclassstage');//项目类别配置删除
})->allowCrossDomain();
//工作
Route::group( function (){
    Route::get('work/week/weeksdisplay', 'v1.Statistics/weeksdisplay'); //周报总览
    Route::get('work/week/preweekdeail', 'v1.Week/preweekdeail'); //获取当周本周周报内容
    Route::get('work/week/list', 'v1.Week/weeklist');
    Route::post('work/week/add', 'v1.Week/weekadd');
    Route::get('work/week/detail', 'v1.Week/weekdetail');
    Route::post('work/week/save', 'v1.Week/weeksave');
    Route::get('work/week/del', 'v1.Week/weekdel');

    Route::get('work/month/list', 'v1.Month/monthlist');
    Route::post('work/month/add', 'v1.Month/monthadd');
    Route::get('work/month/detail', 'v1.Month/monthdetail');
    Route::post('work/month/save', 'v1.Month/monthsave');
    Route::get('work/month/del', 'v1.Month/monthdel');
})->allowCrossDomain();
//总览
Route::group( function (){
    Route::get('statistics/allprojectlist', 'v1.Statistics/allprojectlist');//所有项目总览
})->allowCrossDomain();